package com.longe.controller;

import com.longe.common.Result;
import com.longe.entity.ChatRecord;
import com.longe.service.ChatRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author longe
 * @since 2020-05-23
 */
@RestController
@RequestMapping("/chat/record")
public class ChatRecordController {

    @Autowired
    private ChatRecordService chatRecordService;

    @PostMapping
    public Result<List<ChatRecord>> chatRecords(Integer userId, Integer friendId){

        return chatRecordService.chatRecords(userId, friendId);
    }
}
